// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	8/2/2013 8:14:08 PM				
// -----------------------------

#ifndef _LuaAssert_h
#define _LuaAssert_h

#include "ObjectLuaDef.h"

namespace ObjectLua
{

	OBJECTLUAAPI void LuaAssert(bool expr,
								const char* desc,
								const char* file,
								int line);
	OBJECTLUAAPI void LuaBreak();

	#if defined OBJECTLUA_ASSERT_ENABLED
	#	define LUA_ASSERT(x) \
	do { \
		if ( !(x) ) \
		{ \
			LuaAssert( false , #x , __FILE__ , __LINE__ ); \
			LuaBreak(); \
		} \
	} while ( false )
	#else
	#	define LUA_ASSERT(x)
	#endif

}

#endif